home *** CD-ROM | disk | FTP | other *** search
- /*
- ** This is the TDoc class declaration. This class is an adaptation of
- ** the class of the same name in the book, Elements of C++ Macintosh
- ** Programming, by Dan Weston.
- **
- ** Copyright © 1991 Mark Gross (gross@kaman.com and
- ** RR2, Box 84, Clayville, NY 13322);
- ** this file may be published everywhere, but no charge
- ** may be made for its use. Please contact me about any bugs found.
- ** I'm also looking for Macintosh development work, so drop me a line
- ** if you think I could help.
- **
- */
-
- #define _H_TScrollDoc
-
- #include "TDoc.h"
-
-
- struct TScrollDoc:TDoc
- {
-
- ControlHandle fHorizScrollBar;
- ControlHandle fVertScrollBar;
- short fVOffset;
- short fHOffset;
-
-
- /*
- ** begining of member functions
- */
- ControlHandle GetVScroll(void);
- ControlHandle GetHScroll(void);
-
-
- TDoc* Init(OSType theCreator, SFReply *SFInfor);
- void Delete(void);
-
- Boolean InitDoc(void);
- void GetContentRect(Rect *r);
-
- short GetVertSize(void);
- short GetHorizSize(void);
-
- short GetVertLineScrollAmount(void);
- short GetHorizLineScrollAmount(void);
-
- short GetVertPageScrollAmount(void);
- short GetHorizPageScrollAmount(void);
-
- void FocusOnContent(void);
- void FocusOnWindow(void);
-
- void SizeScrollBars(void);
- void AdjustScrollBars(void);
- void SetScrollBarValues(void);
- void SynchScrollBars(void);
-
- void Activate(void);
- void Deactivate(void);
-
- void DoTheUpdate(EventRecord *theEvent);
-
- void DoContent(EventRecord *theEvent);
- void ScrollClick(EventRecord *theEvent);
-
- void DoGrow(EventRecord *theEvent);
- void DoZoom(short partCode);
-
- void ScrollContents(short dh, short dv);
- void Scroll(ControlHandle theControl, short change);
-
- void DoThumbScroll(ControlHandle theControl, Point localPt);
-
- void DoPageScroll(ControlHandle theControl, short part);
- void DoButtonScroll(ControlHandle theControl, Point localPt);
-
- void ContentClick(EventRecord *theEvent);
-
-
- };/*end of class decloration*/
-
-
- extern TScrollDoc *gCurrScrollDoc;
- pascal void ActionProc(ControlHandle theControl, short partCont);
-